package cn.com.cifi.mars.util;

import cn.com.cifi.mars.bean.vo.price.PriceReportVO;
import cn.com.cifi.mars.bean.vo.price.RemovalReportVO;
import cn.com.cifi.mars.common.enums.PriceReportGroupCodeEnum;
import cn.com.cifi.mars.common.enums.RemovalReportGroupCodeEnum;
import cn.com.cifi.mars.entity.DmDmRemovalReport;
import cn.com.cifi.mars.entity.DmDmValueReport;
import cn.com.cifi.mars.entity.PriceVersion;

import java.io.Serializable;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;

public class BeanConvertUtils {

    public static List<PriceReportVO> toPriceReportVOList(Map<String,Map<String,PriceReportVO>>... map){
        List<PriceReportVO> list = new ArrayList<>();
        for (Map<String, Map<String, PriceReportVO>> per : map) {
            list.addAll(toPriceReportVOList(per));
        }
        return list;
    }

    public static List<PriceReportVO> toPriceReportVOList(Map<String,Map<String,PriceReportVO>> map){
        return map.entrySet().stream().flatMap(x->x.getValue().entrySet().stream()).map(x->x.getValue()).collect(Collectors.toList());
    }


    public static List<RemovalReportVO> toRemovalReportVOList(Map<String,Map<String,RemovalReportVO>>... map){
        List<RemovalReportVO> list = new ArrayList<>();
        for (Map<String, Map<String, RemovalReportVO>> per : map) {
            list.addAll(toRemovalReportVOList(per));
        }
        return list;
    }

    public static List<RemovalReportVO> toRemovalReportVOList(Map<String,Map<String,RemovalReportVO>> map){
        return map.entrySet().stream().flatMap(x->x.getValue().entrySet().stream()).map(x->x.getValue()).collect(Collectors.toList());
    }

    public static Map<String,Map<String,RemovalReportVO>> toRemovalReportVOMap(DmDmValueReport dmDmValueReport, String orgId, String orgName, String parentOrgId, String orgType){
        Map<String,Map<String,RemovalReportVO>> resultMap = new HashMap<>();
        List<RemovalReportVO> list = toRemovalReportVOList(dmDmValueReport, orgId, orgName, parentOrgId, orgType);
        list.stream().forEach(priceReportVO -> {
            Map<String, RemovalReportVO> map = resultMap.get(priceReportVO.getOrgId());
            if (map == null){
                map = new HashMap<>();
                resultMap.put(priceReportVO.getOrgId(),map);
            }
            map.put(priceReportVO.getGroupCode(),priceReportVO);
        });
        return resultMap;
    }

    public static Map<String,Map<String,PriceReportVO>> toPriceReportVOMap(DmDmValueReport dmDmValueReport, String orgId, String orgName, String parentOrgId, String orgType){
        Map<String,Map<String,PriceReportVO>> resultMap = new HashMap<>();
        List<PriceReportVO> list = toPriceReportVOList(dmDmValueReport, orgId, orgName, parentOrgId, orgType);
        list.stream().forEach(priceReportVO -> {
            Map<String, PriceReportVO> map = resultMap.get(priceReportVO.getOrgId());
            if (map == null){
                map = new HashMap<>();
                resultMap.put(priceReportVO.getOrgId(),map);
            }
            map.put(priceReportVO.getGroupCode(),priceReportVO);
        });
        return resultMap;
    }

    public static List<PriceReportVO> toPriceReportVOList(DmDmValueReport dmDmValueReport,String orgId,String orgName,String parentOrgId,String orgType){
        List<PriceReportVO> result = new ArrayList<>();

        //全盘动态 - 总货值
        PriceReportVO dynamicTotalPrice = new PriceReportVO();
        dynamicTotalPrice.setOrgId(orgId);
        dynamicTotalPrice.setOrgName(orgName);
        dynamicTotalPrice.setParentOrgId(parentOrgId);
        dynamicTotalPrice.setOrgType(orgType);
        dynamicTotalPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicTotalPrice.setGroupCode(PriceReportGroupCodeEnum.DYNAMIC_TOTAL_PRICE.getCode());
        dynamicTotalPrice.setGroupName(PriceReportGroupCodeEnum.DYNAMIC_TOTAL_PRICE.getName());
        dynamicTotalPrice.setRoomCount(dmDmValueReport.getTotalRoomNum());
        dynamicTotalPrice.setCarPlateCount(dmDmValueReport.getTotalStallNum());
        dynamicTotalPrice.setArea(dmDmValueReport.getTotalArea());
        dynamicTotalPrice.setRoomTotalPrice(dmDmValueReport.getTotalRoomPrice());
        dynamicTotalPrice.setCarPlateTotalPrice(dmDmValueReport.getTotalStallPrice());
        dynamicTotalPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(dynamicTotalPrice);

        //全盘动态 - 已售货值
        PriceReportVO dynamicSoldPrice = new PriceReportVO();
        dynamicSoldPrice.setOrgId(orgId);
        dynamicSoldPrice.setOrgName(orgName);
        dynamicSoldPrice.setParentOrgId(parentOrgId);
        dynamicSoldPrice.setOrgType(orgType);
        dynamicSoldPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicSoldPrice.setGroupCode(PriceReportGroupCodeEnum.DYNAMIC_SALE_PRICE.getCode());
        dynamicSoldPrice.setGroupName(PriceReportGroupCodeEnum.DYNAMIC_SALE_PRICE.getName());
        dynamicSoldPrice.setRoomCount(dmDmValueReport.getSoldRoomNum());
        dynamicSoldPrice.setCarPlateCount(dmDmValueReport.getSoldStallNum());
        dynamicSoldPrice.setArea(dmDmValueReport.getSoldArea());
        dynamicSoldPrice.setRoomTotalPrice(dmDmValueReport.getSoldRoomPrice());
        dynamicSoldPrice.setCarPlateTotalPrice(dmDmValueReport.getSoldStallPrice());
        dynamicSoldPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(dynamicSoldPrice);

        //全盘动态 - 存货货值
        PriceReportVO dynamicStockPrice = new PriceReportVO();
        dynamicStockPrice.setOrgId(orgId);
        dynamicStockPrice.setOrgName(orgName);
        dynamicStockPrice.setParentOrgId(parentOrgId);
        dynamicStockPrice.setOrgType(orgType);
        dynamicStockPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicStockPrice.setGroupCode(PriceReportGroupCodeEnum.DYNAMIC_STOCK_PRICE.getCode());
        dynamicStockPrice.setGroupName(PriceReportGroupCodeEnum.DYNAMIC_STOCK_PRICE.getName());
        dynamicStockPrice.setRoomCount(dmDmValueReport.getUnSaleRoomNum());
        dynamicStockPrice.setCarPlateCount(dmDmValueReport.getUnSaleStallNum());
        dynamicStockPrice.setArea(dmDmValueReport.getUnSaleArea());
        dynamicStockPrice.setRoomTotalPrice(dmDmValueReport.getUnSaleRoomPrice());
        dynamicStockPrice.setCarPlateTotalPrice(dmDmValueReport.getUnSaleStallPrice());
        dynamicStockPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(dynamicStockPrice);

        //全盘动态 - 规划货值
        PriceReportVO dynamicPlanPrice = new PriceReportVO();
        dynamicPlanPrice.setOrgId(orgId);
        dynamicPlanPrice.setOrgName(orgName);
        dynamicPlanPrice.setParentOrgId(parentOrgId);
        dynamicPlanPrice.setOrgType(orgType);
        dynamicPlanPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicPlanPrice.setGroupCode(PriceReportGroupCodeEnum.DYNAMIC_PLAN_PRICE.getCode());
        dynamicPlanPrice.setGroupName(PriceReportGroupCodeEnum.DYNAMIC_PLAN_PRICE.getName());
        dynamicPlanPrice.setRoomCount(dmDmValueReport.getPlanRoomNum());
        dynamicPlanPrice.setCarPlateCount(dmDmValueReport.getPlanStallNum());
        dynamicPlanPrice.setArea(dmDmValueReport.getPlanArea());
        dynamicPlanPrice.setRoomTotalPrice(dmDmValueReport.getPlanRoomPrice());
        dynamicPlanPrice.setCarPlateTotalPrice(dmDmValueReport.getPlanStallPrice());
        result.add(dynamicPlanPrice);

        //全盘动态 - 未推售车位货值
        PriceReportVO dynamicUnSendPrice = new PriceReportVO();
        dynamicUnSendPrice.setOrgId(orgId);
        dynamicUnSendPrice.setOrgName(orgName);
        dynamicUnSendPrice.setParentOrgId(parentOrgId);
        dynamicUnSendPrice.setOrgType(orgType);
        dynamicUnSendPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicUnSendPrice.setGroupCode(PriceReportGroupCodeEnum.DYNAMIC_UN_SEND_PRICE.getCode());
        dynamicUnSendPrice.setGroupName(PriceReportGroupCodeEnum.DYNAMIC_UN_SEND_PRICE.getName());
        dynamicUnSendPrice.setCarPlateCount(dmDmValueReport.getUnSendSaleStallNum());
        dynamicUnSendPrice.setCarPlateTotalPrice(dmDmValueReport.getUnSendSaleStallPrice());
        dynamicUnSendPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(dynamicUnSendPrice);

        //全盘动态 - 权益货值
        PriceReportVO dynamicRightPrice = new PriceReportVO();
        dynamicRightPrice.setOrgId(orgId);
        dynamicRightPrice.setOrgName(orgName);
        dynamicRightPrice.setParentOrgId(parentOrgId);
        dynamicRightPrice.setOrgType(orgType);
        dynamicRightPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicRightPrice.setGroupCode(PriceReportGroupCodeEnum.DYNAMIC_RIGHT_PRICE.getCode());
        dynamicRightPrice.setGroupName(PriceReportGroupCodeEnum.DYNAMIC_RIGHT_PRICE.getName());
        dynamicRightPrice.setRightPrice(dmDmValueReport.getEquityPrice());
        dynamicRightPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(dynamicRightPrice);

        //土储-投资口径-货值
        PriceReportVO landInvestPrice = new PriceReportVO();
        landInvestPrice.setOrgId(orgId);
        landInvestPrice.setOrgName(orgName);
        landInvestPrice.setParentOrgId(parentOrgId);
        landInvestPrice.setOrgType(orgType);
        landInvestPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        landInvestPrice.setGroupCode(PriceReportGroupCodeEnum.LAND_INVEST_PRICE.getCode());
        landInvestPrice.setGroupName(PriceReportGroupCodeEnum.LAND_INVEST_PRICE.getName());
        landInvestPrice.setRoomCount(dmDmValueReport.getLandInvestRoomNum());
        landInvestPrice.setCarPlateCount(dmDmValueReport.getLandInvestStallNum());
        landInvestPrice.setArea(dmDmValueReport.getLandInvestArea());
        landInvestPrice.setRoomTotalPrice(dmDmValueReport.getLandInvestRoomPrice());
        landInvestPrice.setCarPlateTotalPrice(dmDmValueReport.getLandInvestStallPrice());
        landInvestPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(landInvestPrice);

        //土储-香港口径-货值
        PriceReportVO landHkPrice = new PriceReportVO();
        landHkPrice.setOrgId(orgId);
        landHkPrice.setOrgName(orgName);
        landHkPrice.setParentOrgId(parentOrgId);
        landHkPrice.setOrgType(orgType);
        landHkPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        landHkPrice.setGroupCode(PriceReportGroupCodeEnum.LAND_HK_PRICE.getCode());
        landHkPrice.setGroupName(PriceReportGroupCodeEnum.LAND_HK_PRICE.getName());
        landHkPrice.setRoomCount(dmDmValueReport.getLandHkRoomNum());
        landHkPrice.setCarPlateCount(dmDmValueReport.getLandHkStallNum());
        landHkPrice.setArea(dmDmValueReport.getLandHkArea());
        landHkPrice.setRoomTotalPrice(dmDmValueReport.getLandHkRoomPrice());
        landHkPrice.setCarPlateTotalPrice(dmDmValueReport.getLandHkStallPrice());
        landHkPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(landHkPrice);

        //未开工-货值
        PriceReportVO unStartPrice = new PriceReportVO();
        unStartPrice.setOrgId(orgId);
        unStartPrice.setOrgName(orgName);
        unStartPrice.setParentOrgId(parentOrgId);
        unStartPrice.setOrgType(orgType);
        unStartPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        unStartPrice.setGroupCode(PriceReportGroupCodeEnum.UN_START_PRICE.getCode());
        unStartPrice.setGroupName(PriceReportGroupCodeEnum.UN_START_PRICE.getName());
        unStartPrice.setRoomCount(dmDmValueReport.getUnStartRoomNum());
        unStartPrice.setCarPlateCount(dmDmValueReport.getUnStartStallNum());
        unStartPrice.setArea(dmDmValueReport.getUnStartArea());
        unStartPrice.setRoomTotalPrice(dmDmValueReport.getUnStartRoomPrice());
        unStartPrice.setCarPlateTotalPrice(dmDmValueReport.getUnStartStallPrice());
        unStartPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(unStartPrice);

        //在途-已开工未达形象进度-货值
        PriceReportVO unReachPrice = new PriceReportVO();
        unReachPrice.setOrgId(orgId);
        unReachPrice.setOrgName(orgName);
        unReachPrice.setParentOrgId(parentOrgId);
        unReachPrice.setOrgType(orgType);
        unReachPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        unReachPrice.setGroupCode(PriceReportGroupCodeEnum.UN_REACH_PRICE.getCode());
        unReachPrice.setGroupName(PriceReportGroupCodeEnum.UN_REACH_PRICE.getName());
        unReachPrice.setRoomCount(dmDmValueReport.getUnReachRoomNum());
        unReachPrice.setCarPlateCount(dmDmValueReport.getUnReachStallNum());
        unReachPrice.setArea(dmDmValueReport.getUnReachArea());
        unReachPrice.setRoomTotalPrice(dmDmValueReport.getUnReachRoomPrice());
        unReachPrice.setCarPlateTotalPrice(dmDmValueReport.getUnReachStallPrice());
        unReachPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(unReachPrice);

        //在途-已达形象进度未取证-货值
        PriceReportVO unGetCardPrice = new PriceReportVO();
        unGetCardPrice.setOrgId(orgId);
        unGetCardPrice.setOrgName(orgName);
        unGetCardPrice.setParentOrgId(parentOrgId);
        unGetCardPrice.setOrgType(orgType);
        unGetCardPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        unGetCardPrice.setGroupCode(PriceReportGroupCodeEnum.UN_GET_CARD_PRICE.getCode());
        unGetCardPrice.setGroupName(PriceReportGroupCodeEnum.UN_GET_CARD_PRICE.getName());
        unGetCardPrice.setRoomCount(dmDmValueReport.getUnGetCardRoomNum());
        unGetCardPrice.setCarPlateCount(dmDmValueReport.getUnGetCardStallNum());
        unGetCardPrice.setArea(dmDmValueReport.getUnGetCardArea());
        unGetCardPrice.setRoomTotalPrice(dmDmValueReport.getUnGetCardRoomPrice());
        unGetCardPrice.setCarPlateTotalPrice(dmDmValueReport.getUnGetCardStallPrice());
        unGetCardPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(unGetCardPrice);

        //在途-合计-货值
        PriceReportVO onWayPrice = new PriceReportVO();
        onWayPrice.setOrgId(orgId);
        onWayPrice.setOrgName(orgName);
        onWayPrice.setParentOrgId(parentOrgId);
        onWayPrice.setOrgType(orgType);
        onWayPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        onWayPrice.setGroupCode(PriceReportGroupCodeEnum.ON_WAY_PRICE.getCode());
        onWayPrice.setGroupName(PriceReportGroupCodeEnum.ON_WAY_PRICE.getName());
        onWayPrice.setRoomCount(dmDmValueReport.getOnWayRoomNum());
        onWayPrice.setCarPlateCount(dmDmValueReport.getOnWayStallNum());
        onWayPrice.setArea(dmDmValueReport.getOnWayArea());
        onWayPrice.setRoomTotalPrice(dmDmValueReport.getOnWayRoomPrice());
        onWayPrice.setCarPlateTotalPrice(dmDmValueReport.getOnWayStallPrice());
        onWayPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(onWayPrice);

        //库存-90天内-货值
        PriceReportVO stock90Price = new PriceReportVO();
        stock90Price.setOrgId(orgId);
        stock90Price.setOrgName(orgName);
        stock90Price.setParentOrgId(parentOrgId);
        stock90Price.setOrgType(orgType);
        stock90Price.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        stock90Price.setGroupCode(PriceReportGroupCodeEnum.STOCK_90_PRICE.getCode());
        stock90Price.setGroupName(PriceReportGroupCodeEnum.STOCK_90_PRICE.getName());
        stock90Price.setRoomCount(dmDmValueReport.getUnSale90RoomNum());
        stock90Price.setCarPlateCount(dmDmValueReport.getUnSale90StallNum());
        stock90Price.setArea(dmDmValueReport.getUnSale90Area());
        stock90Price.setRoomTotalPrice(dmDmValueReport.getUnSale90RoomPrice());
        stock90Price.setCarPlateTotalPrice(dmDmValueReport.getUnSale90StallPrice());
        stock90Price.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(stock90Price);

        //库存-90天~180天-货值
        PriceReportVO stock90180Price = new PriceReportVO();
        stock90180Price.setOrgId(orgId);
        stock90180Price.setOrgName(orgName);
        stock90180Price.setParentOrgId(parentOrgId);
        stock90180Price.setOrgType(orgType);
        stock90180Price.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        stock90180Price.setGroupCode(PriceReportGroupCodeEnum.STOCK_90_180_PRICE.getCode());
        stock90180Price.setGroupName(PriceReportGroupCodeEnum.STOCK_90_180_PRICE.getName());
        stock90180Price.setRoomCount(dmDmValueReport.getUnSale90180RoomNum());
        stock90180Price.setCarPlateCount(dmDmValueReport.getUnSale90180StallNum());
        stock90180Price.setArea(dmDmValueReport.getUnSale90180Area());
        stock90180Price.setRoomTotalPrice(dmDmValueReport.getUnSale90180RoomPrice());
        stock90180Price.setCarPlateTotalPrice(dmDmValueReport.getUnSale90180StallPrice());
        stock90180Price.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(stock90180Price);

        //库存-180天~360天-货值
        PriceReportVO stock180360Price = new PriceReportVO();
        stock180360Price.setOrgId(orgId);
        stock180360Price.setOrgName(orgName);
        stock180360Price.setParentOrgId(parentOrgId);
        stock180360Price.setOrgType(orgType);
        stock180360Price.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        stock180360Price.setGroupCode(PriceReportGroupCodeEnum.STOCK_180_360_PRICE.getCode());
        stock180360Price.setGroupName(PriceReportGroupCodeEnum.STOCK_180_360_PRICE.getName());
        stock180360Price.setRoomCount(dmDmValueReport.getUnSale180360RoomNum());
        stock180360Price.setCarPlateCount(dmDmValueReport.getUnSale180360StallNum());
        stock180360Price.setArea(dmDmValueReport.getUnSale180360Area());
        stock180360Price.setRoomTotalPrice(dmDmValueReport.getUnSale180360RoomPrice());
        stock180360Price.setCarPlateTotalPrice(dmDmValueReport.getUnSale180360StallPrice());
        stock180360Price.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(stock180360Price);

        //库存-360天~720天-货值
        PriceReportVO stock360720Price = new PriceReportVO();
        stock360720Price.setOrgId(orgId);
        stock360720Price.setOrgName(orgName);
        stock360720Price.setParentOrgId(parentOrgId);
        stock360720Price.setOrgType(orgType);
        stock360720Price.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        stock360720Price.setGroupCode(PriceReportGroupCodeEnum.STOCK_360_720_PRICE.getCode());
        stock360720Price.setGroupName(PriceReportGroupCodeEnum.STOCK_360_720_PRICE.getName());
        stock360720Price.setRoomCount(dmDmValueReport.getUnSale360720RoomNum());
        stock360720Price.setCarPlateCount(dmDmValueReport.getUnSale360720StallNum());
        stock360720Price.setArea(dmDmValueReport.getUnSale360720Area());
        stock360720Price.setRoomTotalPrice(dmDmValueReport.getUnSale360720RoomPrice());
        stock360720Price.setCarPlateTotalPrice(dmDmValueReport.getUnSale360720StallPrice());
        stock360720Price.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(stock360720Price);

        //库存-720天以上-货值
        PriceReportVO stock720Price = new PriceReportVO();
        stock720Price.setOrgId(orgId);
        stock720Price.setOrgName(orgName);
        stock720Price.setParentOrgId(parentOrgId);
        stock720Price.setOrgType(orgType);
        stock720Price.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        stock720Price.setGroupCode(PriceReportGroupCodeEnum.STOCK_720_PRICE.getCode());
        stock720Price.setGroupName(PriceReportGroupCodeEnum.STOCK_720_PRICE.getName());
        stock720Price.setRoomCount(dmDmValueReport.getUnSale720RoomNum());
        stock720Price.setCarPlateCount(dmDmValueReport.getUnSale720StallNum());
        stock720Price.setArea(dmDmValueReport.getUnSale720Area());
        stock720Price.setRoomTotalPrice(dmDmValueReport.getUnSale720RoomPrice());
        stock720Price.setCarPlateTotalPrice(dmDmValueReport.getUnSale720StallPrice());
        stock720Price.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(stock720Price);


        //库存-180天外（报表导出需要）
        PriceReportVO stock180Price = new PriceReportVO();
        stock180Price.setOrgId(orgId);
        stock180Price.setOrgName(orgName);
        stock180Price.setParentOrgId(parentOrgId);
        stock180Price.setOrgType(orgType);
        stock180Price.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        stock180Price.setGroupCode(PriceReportGroupCodeEnum.STOCK_180_PRICE.getCode());
        stock180Price.setGroupName(PriceReportGroupCodeEnum.STOCK_180_PRICE.getName());
        stock180Price.setRoomCount(dmDmValueReport.getUnSale180RoomNum());
        stock180Price.setCarPlateCount(dmDmValueReport.getUnSale180StallNum());
        stock180Price.setArea(dmDmValueReport.getUnSale180Area());
        stock180Price.setRoomTotalPrice(dmDmValueReport.getUnSale180RoomPrice());
        stock180Price.setCarPlateTotalPrice(dmDmValueReport.getUnSale180StallPrice());
        stock180Price.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(stock180Price);

        //库存-现房-货值
        PriceReportVO stockExistRoomPrice = new PriceReportVO();
        stockExistRoomPrice.setOrgId(orgId);
        stockExistRoomPrice.setOrgName(orgName);
        stockExistRoomPrice.setParentOrgId(parentOrgId);
        stockExistRoomPrice.setOrgType(orgType);
        stockExistRoomPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        stockExistRoomPrice.setGroupCode(PriceReportGroupCodeEnum.STOCK_EXIST_ROOM_PRICE.getCode());
        stockExistRoomPrice.setGroupName(PriceReportGroupCodeEnum.STOCK_EXIST_ROOM_PRICE.getName());
        stockExistRoomPrice.setRoomCount(dmDmValueReport.getUnSaleExistRoomRoomNum());
        stockExistRoomPrice.setCarPlateCount(dmDmValueReport.getUnSaleExistRoomStallNum());
        stockExistRoomPrice.setArea(dmDmValueReport.getUnSaleExistRoomArea());
        stockExistRoomPrice.setRoomTotalPrice(dmDmValueReport.getUnSaleExistRoomRoomPrice());
        stockExistRoomPrice.setCarPlateTotalPrice(dmDmValueReport.getUnSaleExistRoomStallPrice());
        stockExistRoomPrice.setIsSupply(dmDmValueReport.getIsGetPreSaleCard() == null?0:dmDmValueReport.getIsGetPreSaleCard());
        result.add(stockExistRoomPrice);

        return result;
    }

    public static List<RemovalReportVO> toRemovalReportVOList(DmDmValueReport dmDmValueReport,String orgId,String orgName,String parentOrgId,String orgType){
        List<RemovalReportVO> result = new ArrayList<>();

        //全盘动态 - 总货值
        RemovalReportVO dynamicTotalPrice = new RemovalReportVO();
        dynamicTotalPrice.setOrgId(orgId);
        dynamicTotalPrice.setOrgName(orgName);
        dynamicTotalPrice.setParentOrgId(parentOrgId);
        dynamicTotalPrice.setOrgType(orgType);
        dynamicTotalPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicTotalPrice.setGroupCode(RemovalReportGroupCodeEnum.DYNAMIC_TOTAL_PRICE.getCode());
        dynamicTotalPrice.setGroupName(RemovalReportGroupCodeEnum.DYNAMIC_TOTAL_PRICE.getName());
        dynamicTotalPrice.setRoomCount(dmDmValueReport.getTotalRoomNum());
        dynamicTotalPrice.setCarPlateCount(dmDmValueReport.getTotalStallNum());
        dynamicTotalPrice.setArea(dmDmValueReport.getTotalArea());
        dynamicTotalPrice.setRoomTotalPrice(dmDmValueReport.getTotalRoomPrice());
        dynamicTotalPrice.setCarPlateTotalPrice(dmDmValueReport.getTotalStallPrice());
        result.add(dynamicTotalPrice);

        //全盘动态 - 已售货值
        RemovalReportVO dynamicSoldPrice = new RemovalReportVO();
        dynamicSoldPrice.setOrgId(orgId);
        dynamicSoldPrice.setOrgName(orgName);
        dynamicSoldPrice.setParentOrgId(parentOrgId);
        dynamicSoldPrice.setOrgType(orgType);
        dynamicSoldPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicSoldPrice.setGroupCode(RemovalReportGroupCodeEnum.DYNAMIC_SALE_PRICE.getCode());
        dynamicSoldPrice.setGroupName(RemovalReportGroupCodeEnum.DYNAMIC_SALE_PRICE.getName());
        dynamicSoldPrice.setRoomCount(dmDmValueReport.getSoldRoomNum());
        dynamicSoldPrice.setCarPlateCount(dmDmValueReport.getSoldStallNum());
        dynamicSoldPrice.setArea(dmDmValueReport.getSoldArea());
        dynamicSoldPrice.setRoomTotalPrice(dmDmValueReport.getSoldRoomPrice());
        dynamicSoldPrice.setCarPlateTotalPrice(dmDmValueReport.getSoldStallPrice());
        result.add(dynamicSoldPrice);

        //全盘动态 - 存货货值
        RemovalReportVO dynamicStockPrice = new RemovalReportVO();
        dynamicStockPrice.setOrgId(orgId);
        dynamicStockPrice.setOrgName(orgName);
        dynamicStockPrice.setParentOrgId(parentOrgId);
        dynamicStockPrice.setOrgType(orgType);
        dynamicStockPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicStockPrice.setGroupCode(RemovalReportGroupCodeEnum.DYNAMIC_STOCK_PRICE.getCode());
        dynamicStockPrice.setGroupName(RemovalReportGroupCodeEnum.DYNAMIC_STOCK_PRICE.getName());
        dynamicStockPrice.setRoomCount(dmDmValueReport.getUnSaleRoomNum());
        dynamicStockPrice.setCarPlateCount(dmDmValueReport.getUnSaleStallNum());
        dynamicStockPrice.setArea(dmDmValueReport.getUnSaleArea());
        dynamicStockPrice.setRoomTotalPrice(dmDmValueReport.getUnSaleRoomPrice());
        dynamicStockPrice.setCarPlateTotalPrice(dmDmValueReport.getUnSaleStallPrice());
        result.add(dynamicStockPrice);

        //全盘动态 - 规划货值
        RemovalReportVO dynamicPlanPrice = new RemovalReportVO();
        dynamicPlanPrice.setOrgId(orgId);
        dynamicPlanPrice.setOrgName(orgName);
        dynamicPlanPrice.setParentOrgId(parentOrgId);
        dynamicPlanPrice.setOrgType(orgType);
        dynamicPlanPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicPlanPrice.setGroupCode(RemovalReportGroupCodeEnum.DYNAMIC_PLAN_PRICE.getCode());
        dynamicPlanPrice.setGroupName(RemovalReportGroupCodeEnum.DYNAMIC_PLAN_PRICE.getName());
        dynamicPlanPrice.setRoomCount(dmDmValueReport.getPlanRoomNum());
        dynamicPlanPrice.setCarPlateCount(dmDmValueReport.getPlanStallNum());
        dynamicPlanPrice.setArea(dmDmValueReport.getPlanArea());
        dynamicPlanPrice.setRoomTotalPrice(dmDmValueReport.getPlanRoomPrice());
        dynamicPlanPrice.setCarPlateTotalPrice(dmDmValueReport.getPlanStallPrice());
        result.add(dynamicPlanPrice);

        //全盘动态 - 权益货值
        RemovalReportVO dynamicRightPrice = new RemovalReportVO();
        dynamicRightPrice.setOrgId(orgId);
        dynamicRightPrice.setOrgName(orgName);
        dynamicRightPrice.setParentOrgId(parentOrgId);
        dynamicRightPrice.setOrgType(orgType);
        dynamicRightPrice.setIsParking(dmDmValueReport.getIsParking()==null?0:dmDmValueReport.getIsParking());
        dynamicRightPrice.setGroupCode(RemovalReportGroupCodeEnum.DYNAMIC_RIGHT_PRICE.getCode());
        dynamicRightPrice.setGroupName(RemovalReportGroupCodeEnum.DYNAMIC_RIGHT_PRICE.getName());
        dynamicRightPrice.setRightPrice(dmDmValueReport.getEquityPrice());
        result.add(dynamicRightPrice);
        return result;
    }


    public static List<RemovalReportVO> toRemovalReportVOList(RemovalReportVO demoVO, DmDmRemovalReport removalReport, String endDate){
        List<RemovalReportVO> result = new ArrayList<>();

        //历史 - 实际供货
        RemovalReportVO historySupply = new RemovalReportVO();
        historySupply.setOrgId(demoVO.getOrgId());
        historySupply.setOrgName(demoVO.getOrgName());
        historySupply.setParentOrgId(demoVO.getParentOrgId());
        historySupply.setOrgType(demoVO.getOrgType());

        historySupply.setIsParking(demoVO.getIsParking());
        historySupply.setGroupCode(RemovalReportGroupCodeEnum.BEFORE_REAL_SUPPLY.getCode());
        historySupply.setGroupName(RemovalReportGroupCodeEnum.BEFORE_REAL_SUPPLY.getName());
        historySupply.setRoomCount(MathUtils.nullDefaultZero(removalReport.getHistorySupplyActualRoomCount()).intValue());
        historySupply.setCarPlateCount(MathUtils.nullDefaultZero(removalReport.getHistorySupplyActualStallCount()).intValue());
        historySupply.setArea(MathUtils.nullDefaultZero(removalReport.getHistorySupplyActualArea()));
        historySupply.setRoomTotalPrice(MathUtils.nullDefaultZero(removalReport.getHistorySupplyActualRoomPrice()));
        historySupply.setCarPlateTotalPrice(MathUtils.nullDefaultZero(removalReport.getHistorySupplyActualStallPrice()));
        result.add(historySupply);

        //历史 - 实际签约
        RemovalReportVO historySign = new RemovalReportVO();
        historySign.setOrgId(demoVO.getOrgId());
        historySign.setOrgName(demoVO.getOrgName());
        historySign.setParentOrgId(demoVO.getParentOrgId());
        historySign.setOrgType(demoVO.getOrgType());
        historySign.setIsParking(demoVO.getIsParking());
        historySign.setGroupCode(RemovalReportGroupCodeEnum.BEFORE_REAL_SIGN.getCode());
        historySign.setGroupName(RemovalReportGroupCodeEnum.BEFORE_REAL_SIGN.getName());
        historySign.setRoomCount(MathUtils.nullDefaultZero(removalReport.getHistoryContractRoomNum()).intValue());
        historySign.setCarPlateCount(MathUtils.nullDefaultZero(removalReport.getHistoryContractStallNum()).intValue());
        historySign.setArea(MathUtils.nullDefaultZero(removalReport.getHistoryContractRoomArea()));
        historySign.setRoomTotalPrice(MathUtils.nullDefaultZero(removalReport.getHistoryContractRoomPrice()));
        historySign.setCarPlateTotalPrice(MathUtils.nullDefaultZero(removalReport.getHistoryContractStallPrice()));
        result.add(historySign);

        //当年 - 月份
        LocalDate localDate = LocalDate.parse(endDate + "-01", DateTimeFormatter.ISO_LOCAL_DATE);
        for (int i=1;i<=localDate.getMonthValue();i++){
            String monthBet = i >= 10 ? String.valueOf(i) : "0" + i;
            String yearMonth = localDate.getYear() + "_"+ monthBet;
            RemovalReportVO monthSupply = new RemovalReportVO();
            monthSupply.setOrgId(demoVO.getOrgId());
            monthSupply.setOrgName(demoVO.getOrgName());
            monthSupply.setParentOrgId(demoVO.getParentOrgId());
            monthSupply.setOrgType(demoVO.getOrgType());
            monthSupply.setIsParking(demoVO.getIsParking());
            monthSupply.setGroupCode(RemovalReportGroupCodeEnum.DATERANGE_REAL_SUPPLY_YYYY_MM.getCode().replace("yyyy_mm",yearMonth));
            monthSupply.setGroupName(RemovalReportGroupCodeEnum.DATERANGE_REAL_SUPPLY_YYYY_MM.getName().replace("年_月",yearMonth));
            Field[] monthSupplyFields = removalReport.getClass().getDeclaredFields();
            Arrays.stream(monthSupplyFields).filter(x->x.getName().startsWith("month"+monthBet+"stock")).forEach(x->{
                try {
                    x.setAccessible(true);
                    if (x.getName().endsWith("stockRoomCount")){
                        monthSupply.setRoomCount(MathUtils.nullDefaultZero((BigDecimal) x.get(removalReport)).intValue());
                    }else if (x.getName().endsWith("stockStallCount")){
                        monthSupply.setCarPlateCount(MathUtils.nullDefaultZero((BigDecimal) x.get(removalReport)).intValue());
                    }else if (x.getName().endsWith("stockRoomArea")){
                        monthSupply.setArea(MathUtils.nullDefaultZero((BigDecimal) x.get(removalReport)));
                    }else if (x.getName().endsWith("stockRoomPrice")){
                        monthSupply.setRoomTotalPrice(MathUtils.nullDefaultZero((BigDecimal) x.get(removalReport)));
                    }else if (x.getName().endsWith("stockStallPrice")){
                        monthSupply.setCarPlateTotalPrice(MathUtils.nullDefaultZero((BigDecimal) x.get(removalReport)));
                    }
                } catch (IllegalAccessException e) {
                }
            });
            result.add(monthSupply);

            RemovalReportVO monthSign = new RemovalReportVO();
            monthSign.setOrgId(demoVO.getOrgId());
            monthSign.setOrgName(demoVO.getOrgName());
            monthSign.setParentOrgId(demoVO.getParentOrgId());
            monthSign.setOrgType(demoVO.getOrgType());
            monthSign.setIsParking(demoVO.getIsParking());
            monthSign.setGroupCode(RemovalReportGroupCodeEnum.DATERANGE_REAL_SIGN_YYYY_MM.getCode().replace("yyyy_mm",yearMonth));
            monthSign.setGroupName(RemovalReportGroupCodeEnum.DATERANGE_REAL_SIGN_YYYY_MM.getName().replace("年_月",yearMonth));
            Field[] monthSignFields = removalReport.getClass().getDeclaredFields();
            Arrays.stream(monthSignFields).filter(x->x.getName().startsWith("month"+monthBet+"Contract")).forEach(x->{
                try {
                    x.setAccessible(true);
                    if (x.getName().endsWith("ContractRoomNum")){
                        monthSign.setRoomCount(MathUtils.nullDefaultZero((BigDecimal) x.get(removalReport)).intValue());
                    }else if (x.getName().endsWith("ContractStallNum")){
                        monthSign.setCarPlateCount(MathUtils.nullDefaultZero((BigDecimal) x.get(removalReport)).intValue());
                    }else if (x.getName().endsWith("ContractRoomArea")){
                        monthSign.setArea(MathUtils.nullDefaultZero((BigDecimal) x.get(removalReport)));
                    }else if (x.getName().endsWith("ContractRoomPrice")){
                        monthSign.setRoomTotalPrice(MathUtils.nullDefaultZero((BigDecimal) x.get(removalReport)));
                    }else if (x.getName().endsWith("ContractStallPrice")){
                        monthSign.setCarPlateTotalPrice(MathUtils.nullDefaultZero((BigDecimal) x.get(removalReport)));
                    }
                } catch (IllegalAccessException e) {
                }
            });
            result.add(monthSign);
        }

        //当前 - 实际供货合计
        RemovalReportVO currentSupply = new RemovalReportVO();
        currentSupply.setOrgId(demoVO.getOrgId());
        currentSupply.setOrgName(demoVO.getOrgName());
        currentSupply.setParentOrgId(demoVO.getParentOrgId());
        currentSupply.setOrgType(demoVO.getOrgType());
        currentSupply.setIsParking(demoVO.getIsParking());
        currentSupply.setGroupCode(RemovalReportGroupCodeEnum.DATERANGE_REAL_SUPPLY_SUM.getCode());
        currentSupply.setGroupName(RemovalReportGroupCodeEnum.DATERANGE_REAL_SUPPLY_SUM.getName());
        currentSupply.setRoomCount(MathUtils.nullDefaultZero(removalReport.getCurrentStockRoomCount()).intValue());
        currentSupply.setCarPlateCount(MathUtils.nullDefaultZero(removalReport.getCurrentStockStallCount()).intValue());
        currentSupply.setArea(MathUtils.nullDefaultZero(removalReport.getCurrentStockRoomArea()));
        currentSupply.setRoomTotalPrice(MathUtils.nullDefaultZero(removalReport.getCurrentStockRoomPrice()));
        currentSupply.setCarPlateTotalPrice(MathUtils.nullDefaultZero(removalReport.getCurrentStockStallPrice()));
        result.add(currentSupply);


        //当前 - 实际供货合计 - 不含未推售阶段自持存货
        RemovalReportVO currentSupplyExp = new RemovalReportVO();
        currentSupplyExp.setOrgId(demoVO.getOrgId());
        currentSupplyExp.setOrgName(demoVO.getOrgName());
        currentSupplyExp.setParentOrgId(demoVO.getParentOrgId());
        currentSupplyExp.setOrgType(demoVO.getOrgType());
        currentSupplyExp.setIsParking(demoVO.getIsParking());
        currentSupplyExp.setGroupCode(RemovalReportGroupCodeEnum.DATERANGE_REAL_SUPPLY_EXP_SUM.getCode());
        currentSupplyExp.setGroupName(RemovalReportGroupCodeEnum.DATERANGE_REAL_SUPPLY_EXP_SUM.getName());
        currentSupplyExp.setRoomCount(MathUtils.nullDefaultZero(removalReport.getCurrentStockRoomCountExp()).intValue());
        currentSupplyExp.setCarPlateCount(MathUtils.nullDefaultZero(removalReport.getCurrentStockStallCountExp()).intValue());
        currentSupplyExp.setArea(MathUtils.nullDefaultZero(removalReport.getCurrentStockRoomAreaExp()));
        currentSupplyExp.setRoomTotalPrice(MathUtils.nullDefaultZero(removalReport.getCurrentStockRoomPriceExp()));
        currentSupplyExp.setCarPlateTotalPrice(MathUtils.nullDefaultZero(removalReport.getCurrentStockStallPriceExp()));
        result.add(currentSupplyExp);



        //当前 - 实际签约合计  - 不含未推售阶段自持存货
        RemovalReportVO currentSign = new RemovalReportVO();
        currentSign.setOrgId(demoVO.getOrgId());
        currentSign.setOrgName(demoVO.getOrgName());
        currentSign.setParentOrgId(demoVO.getParentOrgId());
        currentSign.setOrgType(demoVO.getOrgType());
        currentSign.setIsParking(demoVO.getIsParking());
        currentSign.setGroupCode(RemovalReportGroupCodeEnum.DATERANGE_REAL_SIGN_SUM.getCode());
        currentSign.setGroupName(RemovalReportGroupCodeEnum.DATERANGE_REAL_SIGN_SUM.getName());
        currentSign.setRoomCount(MathUtils.nullDefaultZero(removalReport.getCurrentContractRoomNum()).intValue());
        currentSign.setCarPlateCount(MathUtils.nullDefaultZero(removalReport.getCurrentContractStallNum()).intValue());
        currentSign.setArea(MathUtils.nullDefaultZero(removalReport.getCurrentContractRoomArea()));
        currentSign.setRoomTotalPrice(MathUtils.nullDefaultZero(removalReport.getCurrentContractRoomPrice()));
        currentSign.setCarPlateTotalPrice(MathUtils.nullDefaultZero(removalReport.getCurrentContractStallPrice()));
        result.add(currentSign);


        //当前 - 实际签约合计  - 不含未推售阶段自持存货
        RemovalReportVO currentSignExp = new RemovalReportVO();
        currentSignExp.setOrgId(demoVO.getOrgId());
        currentSignExp.setOrgName(demoVO.getOrgName());
        currentSignExp.setParentOrgId(demoVO.getParentOrgId());
        currentSignExp.setOrgType(demoVO.getOrgType());
        currentSignExp.setIsParking(demoVO.getIsParking());
        currentSignExp.setGroupCode(RemovalReportGroupCodeEnum.DATERANGE_REAL_SIGN_EXP_SUM.getCode());
        currentSignExp.setGroupName(RemovalReportGroupCodeEnum.DATERANGE_REAL_SIGN_EXP_SUM.getName());
        currentSignExp.setRoomCount(MathUtils.nullDefaultZero(removalReport.getCurrentContractRoomNumExp()).intValue());
        currentSignExp.setCarPlateCount(MathUtils.nullDefaultZero(removalReport.getCurrentContractStallNumExp()).intValue());
        currentSignExp.setArea(MathUtils.nullDefaultZero(removalReport.getCurrentContractRoomAreaExp()));
        currentSignExp.setRoomTotalPrice(MathUtils.nullDefaultZero(removalReport.getCurrentContractRoomPriceExp()));
        currentSignExp.setCarPlateTotalPrice(MathUtils.nullDefaultZero(removalReport.getCurrentContractStallPriceExp()));
        result.add(currentSignExp);


        //整盘 - 实际供货合计
        RemovalReportVO totalSupply = new RemovalReportVO();
        totalSupply.setOrgId(demoVO.getOrgId());
        totalSupply.setOrgName(demoVO.getOrgName());
        totalSupply.setParentOrgId(demoVO.getParentOrgId());
        totalSupply.setOrgType(demoVO.getOrgType());
        totalSupply.setIsParking(demoVO.getIsParking());
        totalSupply.setGroupCode(RemovalReportGroupCodeEnum.OVERALL_REAL_SUPPLY.getCode());
        totalSupply.setGroupName(RemovalReportGroupCodeEnum.OVERALL_REAL_SUPPLY.getName());
        totalSupply.setRoomCount(MathUtils.nullDefaultZero(removalReport.getTotalStockRoomCount()).intValue());
        totalSupply.setCarPlateCount(MathUtils.nullDefaultZero(removalReport.getTotalStockStallCount()).intValue());
        totalSupply.setArea(MathUtils.nullDefaultZero(removalReport.getTotalStockRoomArea()));
        totalSupply.setRoomTotalPrice(MathUtils.nullDefaultZero(removalReport.getTotalStockRoomPrice()));
        totalSupply.setCarPlateTotalPrice(MathUtils.nullDefaultZero(removalReport.getTotalStockStallPrice()));
        result.add(totalSupply);


        //整盘 - 实际签约合计
        RemovalReportVO totalSign = new RemovalReportVO();
        totalSign.setOrgId(demoVO.getOrgId());
        totalSign.setOrgName(demoVO.getOrgName());
        totalSign.setParentOrgId(demoVO.getParentOrgId());
        totalSign.setOrgType(demoVO.getOrgType());
        totalSign.setIsParking(demoVO.getIsParking());
        totalSign.setGroupCode(RemovalReportGroupCodeEnum.OVERALL_REAL_SIGN.getCode());
        totalSign.setGroupName(RemovalReportGroupCodeEnum.OVERALL_REAL_SIGN.getName());
        totalSign.setRoomCount(MathUtils.nullDefaultZero(removalReport.getTotalContractRoomNum()).intValue());
        totalSign.setCarPlateCount(MathUtils.nullDefaultZero(removalReport.getTotalContractStallNum()).intValue());
        totalSign.setArea(MathUtils.nullDefaultZero(removalReport.getTotalContractRoomArea()));
        totalSign.setRoomTotalPrice(MathUtils.nullDefaultZero(removalReport.getTotalContractRoomPrice()));
        totalSign.setCarPlateTotalPrice(MathUtils.nullDefaultZero(removalReport.getTotalContractStallPrice()));
        result.add(totalSign);

        return result;
    }

}
